/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author ADMIN
 */
@Entity
@Table(name = "staffs")
@NamedQueries({
    @NamedQuery(name = "Staffs.findAll", query = "SELECT s FROM Staffs s"),
    @NamedQuery(name = "Staffs.findByStid", query = "SELECT s FROM Staffs s WHERE s.stid = :stid"),
    @NamedQuery(name = "Staffs.findByStname", query = "SELECT s FROM Staffs s WHERE s.stname = :stname"),
    @NamedQuery(name = "Staffs.findByStpass", query = "SELECT s FROM Staffs s WHERE s.stpass = :stpass")})
public class Staffs implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "stid")
    private Integer stid;
    @Basic(optional = false)
    @Column(name = "stname")
    private String stname;
    @Basic(optional = false)
    @Column(name = "stpass")
    private String stpass;

    public Staffs() {
    }

    public Staffs(Integer stid) {
        this.stid = stid;
    }

    public Staffs(Integer stid, String stname, String stpass) {
        this.stid = stid;
        this.stname = stname;
        this.stpass = stpass;
    }

    public Integer getStid() {
        return stid;
    }

    public void setStid(Integer stid) {
        this.stid = stid;
    }

    public String getStname() {
        return stname;
    }

    public void setStname(String stname) {
        this.stname = stname;
    }

    public String getStpass() {
        return stpass;
    }

    public void setStpass(String stpass) {
        this.stpass = stpass;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (stid != null ? stid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Staffs)) {
            return false;
        }
        Staffs other = (Staffs) object;
        if ((this.stid == null && other.stid != null) || (this.stid != null && !this.stid.equals(other.stid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entity.Staffs[stid=" + stid + "]";
    }

}
